import React from 'react';
import PropTypes from 'prop-types';

import Description from '../Description';
import StyledDescriptionRow from './style';

function DescriptionRow({ row }) {
  return (
    <StyledDescriptionRow>
      {row.map((item) => {
        return (
          <Description
            key={item.id}
            percent={item.percent}
            label={item.label}
            value={item.value}
          />
        );
      })}
    </StyledDescriptionRow>
  );
}

DescriptionRow.propTypes = {
  row: PropTypes.array,
};

export default DescriptionRow;
